<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>

<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>



<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link rel="stylesheet" type="text/css"
	href="${pageContext.request.contextPath}/css/style.css">
<link rel="stylesheet" type="text/css" href="css/style.css">
<!-- <script type="text/javascript" src="js/jquery-1.9.1.js"></script> -->
<script type="text/javascript"
	src="${pageContext.request.contextPath}/js/jquery-1.9.1.js"></script>
<!-- <script type="text/javascript" src="js/script.js"></script> -->
<script type="text/javascript"
	src="${pageContext.request.contextPath}/js/script.js"></script>
	
	
 
  
  
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Survey on progress !!</title>
</head>
<body>
	<div id="surveyDiv" align="center">
		<form:form method="post" modelAttribute="form">
		
	
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
			<table class="surveyTable">



				<tr>
					<th colspan="3">

						<table style="width: 100%;" class="infoTable">
							<tr>
								<th style="text-align: left;">${form.user.userName}<br />${form.user.cedulla}</th>
								<th style="text-align: right;">Semester :
									${form.user.currentSemester}<br />Department : ${form.user.department}<br/> User Type :  ${form.user.userType}
								</th>
							</tr>
							<tr>
								<th colspan="2"></th>
							</tr>
							<tr>
								<th style="text-align: left;" colspan="2">${form.subject.subjectName}</th>
							</tr>
						</table>

					</th>
				</tr>


				<tr>
					<td>&nbsp;</td>
				</tr>

				<tr style="background-color: #58ACFA">
					<th width="10%">Sr.No</th>
					<th width="60%">Question</th>
					<th width="30%">Options</th>
				</tr>


				<tr>
					<td width="5%"></td>
					<td width="30%"></td>

					<td width="65%">
						<table>
							<tr style="font-size: 10px; font-family: verdana;">
								<th width="25%">Everytime</th>
								<th width="25%">Often</th>
								<th width="25%">Sometimes</th>
								<th width="25%">Never</th>
							</tr>
						</table>
					</td>

				</tr>


				<c:forEach items="${form.questions}" var="question"
					varStatus="status">
					<tr style="background-color: #F6CED8;">
						<td align="center" width="5%">${status.count}</td>
						<td width="30%"><p>${question.questionString}</p></td>
						<td width="65%">
							<table>
								<tr style="font-size: 10px; font-family: verdana;">
									<th width="25%"><input type="radio"
										name="questions[${status.index}].rating" value="1" /></th>
									<th width="25%"><input type="radio"
										name="questions[${status.index}].rating" value="2" /></th>
									<th width="25%"><input type="radio"
										name="questions[${status.index}].rating" value="3" /></th>
									<th width="25%"><input type="radio"
										name="questions[${status.index}].rating" value="4" /></th>
								</tr>
							</table> <input name="questions[${status.index}].questionId"
							value="${question.questionId}" class="hiddenField"> <input
							name="questions[${status.index}].subjectId"
							value="${question.subjectId}" class="hiddenField">
						</td>

					</tr>
				</c:forEach>
			</table>
			<br />
			<input type="submit" value="Submit" /><a href="spring/cancelSurvey">Cancel Survey</a>

		</form:form>
	</div>
</body>
</html>